﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace Tools.ListVievO
{
    public static class ListViewUpravy
    {
        public static string getValueSelect(string col, ListView listView)
        {
            try
            {
                System.Data.DataRowView value = (System.Data.DataRowView)listView.SelectedValue;
                if (listView.SelectedIndex != -1)
                {
                    value = (System.Data.DataRowView)listView.SelectedValue;
                }
                return value.Row[col].ToString();
            }
            catch
            {
                return "";
            }

        }
    }
}
